Design Hashmap - Leetcode 706 - Python